package com.seecoder.BlueWhale.serviceImpl.calPriceStrategy;

public class FullReductionCouponCalculateStrategy implements CalculateStrategy {

    private final Double fill;
    private final Double reduce;
    @Override
    public Double calculate(Double price) {
        if (price >= fill) {
            price -= reduce;
        }
        return price;
    }

    public FullReductionCouponCalculateStrategy(Double fill, Double reduce) {
        this.fill = fill;
        this.reduce = reduce;
    }

}
